package com.open.capacity;


import com.open.capacity.client.dao.SysClientServiceDao;
import com.open.capacity.client.entity.SysClientService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.FilterType;

import com.open.capacity.common.config.TraceFilterConfig;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@EnableCircuitBreaker
@EnableDiscoveryClient
@ComponentScan(excludeFilters = @ComponentScan.Filter(type = FilterType.ASSIGNABLE_TYPE, value = TraceFilterConfig.class)) 
@SpringBootApplication

@RestController
public class ApiGateWayApp {
    public static void main(String[] args) {
        SpringApplication.run(ApiGateWayApp.class, args);
    }

    @Autowired
    private SysClientServiceDao sysClientServiceDao;

    @RequestMapping("/test2")
    public String test(){
        List<SysClientService> sysClientServices = sysClientServiceDao.selectList(null);
        System.out.println(sysClientServices);

        return sysClientServices.toString();
    }
}